﻿using System;
using UniRx.Triggers;
using UnityEngine;

namespace UniRx.Examples
{
	// Token: 0x020001E5 RID: 485
	public class Sample03_GameObjectAsObservable : MonoBehaviour
	{
		// Token: 0x06000A2C RID: 2604 RVA: 0x00036C1C File Offset: 0x0003501C
		private void Start()
		{
			(from _ in this.OnMouseDownAsObservable().SelectMany((Unit _) => base.gameObject.UpdateAsObservable()).TakeUntil(base.gameObject.OnMouseUpAsObservable())
			select Input.mousePosition).RepeatUntilDestroy(this).Subscribe(delegate(Vector3 x)
			{
				Debug.Log(x);
			}, delegate()
			{
				Debug.Log("!!!complete");
			});
		}
	}
}
